<!--
 * @Autor: lh
 * @Date: 2023-10-08 16:08:08
 * @LastEditors: lh
 * @LastEditTime: 2023-10-08 18:24:49
 * @Description: 
-->
<template>
  <div>
    预览文件exe;： <input type="text" v-model="docx" />
    <vue-office-docx :src="docx" style="height: 100vh" @rendered="rendered" />
  </div>
</template>

<script>
//引入VueOfficeDocx组件
import VueOfficeDocx from "@vue-office/docx"
//引入相关样式
import "@vue-office/docx/lib/index.css"

export default {
  components: {
    VueOfficeDocx
  },
  data() {
    return {
      docx: "http://static.shanhuxueyuan.com/test6.docx" //设置docx文档网络地址，可以是相对地址
      // docx: 'http://111.231.202.174:16560/file/1.docx' //设置文档网络地址，可以是相对地址
      // docx:'http://111.231.202.174:16560/file/427620322823766016.docx',
      // docx:'https://v5.h5.ssche.cn/file/dddd.doc',
      // docx: "https://v5.h5.ssche.cn/file/aa.docx"
      // docx:'http://111.231.202.174:8800/file/427620322823766016.docx',
      // docx:'http://111.231.202.174:8800/file/427646973548822528.docx',
      // docx:'/file/proxy/file/427646973548822528.docx',
    }
  },
  methods: {
    rendered() {
      console.log("渲染完成")
    }
  }
}
</script>
